﻿using System;
using System.Data;
using System.Data.SqlClient;

public partial class SMTP : System.Web.UI.Page
{
    MSSQLHelp.SqlDbHelper _sqlhelp = new MSSQLHelp.SqlDbHelper();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Bt_SMTP_Add_Click(object sender, EventArgs e)
    {
        int i = _sqlhelp.ExecuteNonQuery("SMTP_ADD", CommandType.StoredProcedure, new SqlParameter[] { 
        new SqlParameter("@id",""),        
        new SqlParameter("@cid","1"),
        new SqlParameter("@smtpmail",this.Tb_server.Text.Trim()),
        new SqlParameter("@port",this.Tb_port.Text.Trim()),
        new SqlParameter("@name",this.Tb_name.Text.Trim()),
        new SqlParameter("@username",this.Tb_user.Text.Trim()),
        new SqlParameter("@userpass",this.Tb_pass.Text.Trim()),
        new SqlParameter("@userother","")
        });
        Response.Write("<script>alert(" + i.ToString() + ")</script>");
    }
}